<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>${systemTitle}${systemSubtitle}</title>
    <meta name="description" content="这是一个form页面">
    <meta name="keywords" content="form">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="/assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="/assets/css/admin.css">
    <link rel="stylesheet" href="/layer/css/modules/layer/default/layer.css">
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
    以获得更好的体验！</p>
<![endif]-->

<header class="am-topbar admin-header">
    <div class="am-topbar-brand">
        <strong>${systemTitle}</strong>
        <small>${systemSubtitle}</small>
    </div>

    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
            data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span
            class="am-icon-bars"></span></button>

    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">

        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">

            <li class="am-dropdown" data-am-dropdown>
                <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
                    <span class="am-icon-users"></span> 管理员 <span class="am-icon-caret-down"></span>
                </a>
                <ul class="am-dropdown-content">
                    <li id="changePassword"><a href="#"><span class="am-icon-user"></span> 修改密码</a></li>
                    <li><a href="/bk/user/logout/"><span class="am-icon-power-off"></span> 退出</a></li>
                </ul>
            </li>

        </ul>
    </div>
</header>

<div class="am-cf admin-main">
    <!-- sidebar start -->
    <div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
        <div class="am-offcanvas-bar admin-offcanvas-bar">
            <ul class="am-list admin-sidebar-list">
                <#list slider as item>
                    <li><a href="${item.link}"><span class="am-icon-sign-out"></span> ${item.title}</a></li>
                </#list>
            </ul>
        </div>
    </div>
    <!-- sidebar end -->

    <!-- content start -->
    <div class="admin-content">

        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">技师详情</strong> /
                <small>${subtitle}</small>
            </div>
        </div>

        <div class="am-tabs am-margin" data-am-tabs>
            <div class="am-tab-panel am-active" id="tab1">
                <form class="am-form" method="post" enctype="multipart/form-data" action="${action}">
                    <div hidden>
                        <input type="text" class="am-input-sm" value="${(info.id)!''}" name="bkSelection.id">
                        <input type="text" class="am-input-sm" value="${(shopId)!''}" name="bkSelection.shopId">
                    </div>
                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            名称
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end">
                            <input type="text" class="am-input-sm" name="bkSelection.name" value="${(info.name)!''}">
                        </div>
                    </div>
                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            电子邮箱
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end">
                            <input type="text" class="am-input-sm" name="bkSelection.email" value="${(info.email)!''}">
                        </div>
                    </div>
                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            封面图片
                        </div>
                        <div class="am-u-sm-8 am-u-md-4">
                            <input type="file" name="image" id="file0" multiple="multiple"/><br><img
                                src="${(info.image)!''}" id="img0"
                                width="200" height="150" style="object-fit: cover">
                        </div>
                        <div class="am-u-sm-12 am-u-md-6"></div>
                    </div>

                    <div class="am-g am-margin-top-sm" hidden>
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            最大容客量
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end">
                            <input type="text" class="am-input-sm" name="bkSelection.limit" value="${(info.limit)!''}">
                        </div>
                    </div>

                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            简介
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end">
                            <textarea rows="4" name="bkSelection.intro">${(info.intro)!''}</textarea>
                        </div>
                    </div>
                    <!--<button type="submit" class="am-btn am-btn-primary am-btn-xs">提交保存</button>-->
                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end">
                            <button type="submit" class="am-btn am-btn-primary am-btn-xs">提交保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <!-- content end -->

    </div>
</div>

<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu"
   data-am-offcanvas="{target: '#admin-offcanvas'}"></a>

<footer>
    <hr>
    <p class="am-padding-left">${footer}</p>
</footer>

<script src="/assets/js/jquery-2.1.0.js"></script>

<script src="/assets/js/amazeui.min.js"></script>
<script src="/assets/js/amazeui.js"></script>

<script src="/cjwJs/utils.js"></script>
<script src="/assets/js/app.js"></script>
<script src="/cjwJs/uploadimage.js"></script>
<script src="/layer/layui.js"></script>
<script src="/layer/layer.js"></script>

<script>
    $('form').on('submit',function () {
        var name=$('input[name="bkSelection.name"]').val();
        name=name.replace(/\ +/g,"");
        if(name.length==0){
            layer.open({
                type: 1,
                id: 'layerDemo' + 1 ,
                title: '提示',
                content: '<div style="padding: 20px 50px;">名称不能为空</div>',
                btn: '确定',
                btnAlign: 'c' //按钮居中
                ,shade: 0 //不显示遮罩
                ,btn1: function () {
                    layer.closeAll();
                }
            })
            return false;
        }
    });
    $('#changePassword').on('click', function () {
        layer.open({
            type: 1,
            id: 'layerDemo' + 1 ,
            title: '修改密码',
            content: '<div style="padding: 10px 20px;"> <input type="password" name="oldPassworld" style="padding: 5px 10px" placeholder="输入原密码" pattern="^\d{6}$" required/></div><div style="padding: 10px 20px;"> <input type="password" name="password" style="padding: 5px 10px" placeholder="输入新密码" pattern="^\d{6}$" required/></div>',
            btn: '确定',
            btnAlign: 'c' //按钮居中
            ,shade: 0 //不显示遮罩
            ,btn1: function () {
                var url = '/bk/shop/changePassword/';
                var password = $('input[name="password"]').val();
                var oldPassworld = $('input[name="oldPassworld"]').val();
                $.getJSON(url, {password: password,oldPassworld:oldPassworld}, function (json) {
                    layer.closeAll();
                    var href=url+'?password='+password+'&oldPassworld='+oldPassworld;
                    rquestStatus(href)
                })
            }
        });
    });

</script>
</body>
</html>
